<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="author" content="lijinbo" />
    <script type="text/javascript" src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/vue/2.6.14/vue.min.js"></script>
    <title>025-模拟银行</title>
    <style></style>
    <script type="module" crossorigin src="../../../../static/js/025-index.html-7fcf27d0.js"></script>
    <link rel="modulepreload" crossorigin href="../../../../static/common/modulepreload-polyfill-3cfb730f.js">
  </head>

  <body>
    <div id="app">
      <div class="box">
        <input v-model="user.name" type="text" placeholder="账户名" />
        <input v-model="user.initMoney" type="number" min="1" placeholder="初始金额" />
        <input v-model="user.rate" type="number" min="0.3" placeholder="利率" />
        <button @click="createAccount">创建账户</button>
      </div>
      <div>
        <p>时间： 第 {{ currentDate }} 天</p>
      </div>
      <div id="accountList">
        <div v-for="(item,index) in accountList" :key="index" class="show_user_box">
          <div>
            <p><input v-model="money" type="number" placeholder="金额" /></p>
            <button @click="deposit(item)">存入</button>
            <button @click="withdraw(item)">取出</button>
          </div>
          <p>账户：{{ item.userName }}</p>
          <p>余额：{{ item.balance }}</p>
          <ol>
            <li v-for="(order, oIndex) in item.orderList" :key="oIndex">
              <span
                >时间: {{ order.date }} 金额: {{ order.amount }} 总利息: {{ order.interestSum }} 本息合计: {{
                order.sumBalanceInter }}</span
              >
            </li>
          </ol>
        </div>
      </div>
    </div>
    
    
  </body>
</html>
